Integrand size = 29, antiderivative size = 60 \[ \int \sec (c+d x) (a+a \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx=-\frac {2 a^2 (A+B) \log (1-\sin (c+d x))}{d}-\frac {a^2 (A+B) \sin (c+d x)}{d}-\frac {B (a+a \sin (c+d x))^2}{2 d} \]
Time = 0.06 (sec) , antiderivative size = 51, normalized size of antiderivative = 0.85 \[ \int \sec (c+d x) (a+a \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx=\frac {a \left (-2 a (A+B) \log (1-\sin (c+d x))-a (A+2 B) \sin (c+d x)-\frac {1}{2} a B \sin ^2(c+d x)\right )}{d} \]
(a*(-2*a*(A + B)*Log[1 - Sin[c + d*x]] - a*(A + 2*B)*Sin[c + d*x] - (a*B*S in[c + d*x]^2)/2))/d
Time = 0.27 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.93, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {3042, 3315, 27, 86, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sec (c+d x) (a \sin (c+d x)+a)^2 (A+B \sin (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a \sin (c+d x)+a)^2 (A+B \sin (c+d x))}{\cos (c+d x)}dx\) |
\(\Big \downarrow \) 3315 |
\(\displaystyle \frac {a \int \frac {(\sin (c+d x) a+a) (a A+a B \sin (c+d x))}{a (a-a \sin (c+d x))}d(a \sin (c+d x))}{d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int \frac {(\sin (c+d x) a+a) (a A+a B \sin (c+d x))}{a-a \sin (c+d x)}d(a \sin (c+d x))}{d}\) |
\(\Big \downarrow \) 86 |
\(\displaystyle \frac {\int \left (\frac {2 (A+B) a^2}{a-a \sin (c+d x)}-(A+B) a-B (\sin (c+d x) a+a)\right )d(a \sin (c+d x))}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {-a^2 (A+B) \sin (c+d x)-2 a^2 (A+B) \log (a-a \sin (c+d x))-\frac {1}{2} B (a \sin (c+d x)+a)^2}{d}\) |
(-2*a^2*(A + B)*Log[a - a*Sin[c + d*x]] - a^2*(A + B)*Sin[c + d*x] - (B*(a + a*Sin[c + d*x])^2)/2)/d
3.10.73.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_ .), x_] :> Int[ExpandIntegrand[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && ((ILtQ[n, 0] && ILtQ[p, 0]) || EqQ[p, 1 ] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_ .)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[1/(b^p* f) Subst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2)*(c + (d/b)*x)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, c, d, m, n}, x] && Intege rQ[(p - 1)/2] && EqQ[a^2 - b^2, 0]
Time = 0.28 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.25
method | result | size |
parallelrisch | \(\frac {2 \left (\left (A +B \right ) \ln \left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-2 B -2 A \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+\frac {B \cos \left (2 d x +2 c \right )}{8}+\left (-\frac {A}{2}-B \right ) \sin \left (d x +c \right )-\frac {B}{8}\right ) a^{2}}{d}\) | \(75\) |
derivativedivides | \(\frac {A \,a^{2} \left (-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+B \,a^{2} \left (-\frac {\left (\sin ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )-2 A \,a^{2} \ln \left (\cos \left (d x +c \right )\right )+2 B \,a^{2} \left (-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+A \,a^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )-B \,a^{2} \ln \left (\cos \left (d x +c \right )\right )}{d}\) | \(133\) |
default | \(\frac {A \,a^{2} \left (-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+B \,a^{2} \left (-\frac {\left (\sin ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )-2 A \,a^{2} \ln \left (\cos \left (d x +c \right )\right )+2 B \,a^{2} \left (-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+A \,a^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )-B \,a^{2} \ln \left (\cos \left (d x +c \right )\right )}{d}\) | \(133\) |
norman | \(\frac {-\frac {2 B \,a^{2} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 B \,a^{2} \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 a^{2} \left (A +2 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {4 a^{2} \left (A +2 B \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 a^{2} \left (A +2 B \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}-\frac {4 a^{2} \left (A +B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}+\frac {2 a^{2} \left (A +B \right ) \ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}\) | \(177\) |
risch | \(2 i x \,a^{2} A +2 i x \,a^{2} B +\frac {i {\mathrm e}^{i \left (d x +c \right )} A \,a^{2}}{2 d}+\frac {i {\mathrm e}^{i \left (d x +c \right )} B \,a^{2}}{d}-\frac {i a^{2} {\mathrm e}^{-i \left (d x +c \right )} A}{2 d}-\frac {i a^{2} {\mathrm e}^{-i \left (d x +c \right )} B}{d}+\frac {4 i a^{2} A c}{d}+\frac {4 i a^{2} B c}{d}-\frac {4 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) A}{d}-\frac {4 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B}{d}+\frac {a^{2} \cos \left (2 d x +2 c \right ) B}{4 d}\) | \(178\) |
2*((A+B)*ln(sec(1/2*d*x+1/2*c)^2)+(-2*B-2*A)*ln(tan(1/2*d*x+1/2*c)-1)+1/8* B*cos(2*d*x+2*c)+(-1/2*A-B)*sin(d*x+c)-1/8*B)*a^2/d
Time = 0.28 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.90 \[ \int \sec (c+d x) (a+a \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx=\frac {B a^{2} \cos \left (d x + c\right )^{2} - 4 \, {\left (A + B\right )} a^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (A + 2 \, B\right )} a^{2} \sin \left (d x + c\right )}{2 \, d} \]
1/2*(B*a^2*cos(d*x + c)^2 - 4*(A + B)*a^2*log(-sin(d*x + c) + 1) - 2*(A + 2*B)*a^2*sin(d*x + c))/d
\[ \int \sec (c+d x) (a+a \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx=a^{2} \left (\int A \sec {\left (c + d x \right )}\, dx + \int 2 A \sin {\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int A \sin ^{2}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int B \sin {\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int 2 B \sin ^{2}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int B \sin ^{3}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx\right ) \]
a**2*(Integral(A*sec(c + d*x), x) + Integral(2*A*sin(c + d*x)*sec(c + d*x) , x) + Integral(A*sin(c + d*x)**2*sec(c + d*x), x) + Integral(B*sin(c + d* x)*sec(c + d*x), x) + Integral(2*B*sin(c + d*x)**2*sec(c + d*x), x) + Inte gral(B*sin(c + d*x)**3*sec(c + d*x), x))
Time = 0.22 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.87 \[ \int \sec (c+d x) (a+a \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx=-\frac {B a^{2} \sin \left (d x + c\right )^{2} + 4 \, {\left (A + B\right )} a^{2} \log \left (\sin \left (d x + c\right ) - 1\right ) + 2 \, {\left (A + 2 \, B\right )} a^{2} \sin \left (d x + c\right )}{2 \, d} \]
-1/2*(B*a^2*sin(d*x + c)^2 + 4*(A + B)*a^2*log(sin(d*x + c) - 1) + 2*(A + 2*B)*a^2*sin(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 220 vs. \(2 (58) = 116\).
Time = 0.31 (sec) , antiderivative size = 220, normalized size of antiderivative = 3.67 \[ \int \sec (c+d x) (a+a \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx=\frac {2 \, {\left (A a^{2} + B a^{2}\right )} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right ) - 4 \, {\left (A a^{2} + B a^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {3 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 3 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 2 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 4 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 8 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 4 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, A a^{2} + 3 \, B a^{2}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2}}}{d} \]
(2*(A*a^2 + B*a^2)*log(tan(1/2*d*x + 1/2*c)^2 + 1) - 4*(A*a^2 + B*a^2)*log (abs(tan(1/2*d*x + 1/2*c) - 1)) - (3*A*a^2*tan(1/2*d*x + 1/2*c)^4 + 3*B*a^ 2*tan(1/2*d*x + 1/2*c)^4 + 2*A*a^2*tan(1/2*d*x + 1/2*c)^3 + 4*B*a^2*tan(1/ 2*d*x + 1/2*c)^3 + 6*A*a^2*tan(1/2*d*x + 1/2*c)^2 + 8*B*a^2*tan(1/2*d*x + 1/2*c)^2 + 2*A*a^2*tan(1/2*d*x + 1/2*c) + 4*B*a^2*tan(1/2*d*x + 1/2*c) + 3 *A*a^2 + 3*B*a^2)/(tan(1/2*d*x + 1/2*c)^2 + 1)^2)/d
Time = 0.10 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.05 \[ \int \sec (c+d x) (a+a \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx=-\frac {\sin \left (c+d\,x\right )\,\left (a^2\,\left (A+B\right )+B\,a^2\right )+\ln \left (\sin \left (c+d\,x\right )-1\right )\,\left (2\,A\,a^2+2\,B\,a^2\right )+\frac {B\,a^2\,{\sin \left (c+d\,x\right )}^2}{2}}{d} \]